package cn.niit.service.impl;
import cn.niit.User;
import cn.niit.dao.UserDao;
import cn.niit.service.UserService;
import java.util.ArrayList;
import java.util.List;

public class UserServiceImpl implements UserService {
     private  UserDao userDao;
        public void setUserDao(UserDao userDao) {
            this.userDao = userDao;
       }

    public UserDao getUserDao() {
        return userDao;
    }

    @Override
    public int addUser() {
        System.out.println("[UserServiceImpl]处理用户添加相关业务逻辑！！！");
        userDao.insert();
        return 0;
    }

    @Override
    public int deleteUsre(Long userId) {
        System.out.println("调用DAO执行数据库操作，删除用户");
        return 1;
    }


    @Override
    public List<User> selectUser(User userVO) {
        System.out.println("调用DAO执行数据库操作，查询用户");
        return new ArrayList<User>();
    }

    @Override
    public int updateUser(User user) {
        System.out.println("调用DAO执行数据库操作，修改用户");
        return 1;
    }
}
